Skip to content

[feat] video: add editable reference shot breakdowns - #606

Open
prettygirlisnotme wants to merge 14 commits into
ThinkFlowLab:mainfrom
prettygirlisnotme:feat/reference-shot-breakdown-171-draft
Open

prettygirlisnotme wants to merge 14 commits into
ThinkFlowLab:mainfrom
prettygirlisnotme:feat/reference-shot-breakdown-171-draft

Conversation

@prettygirlisnotme

@prettygirlisnotme prettygirlisnotme commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Refs #171. Select a reference video on the canvas to detect cuts locally and save representative frames as part of the project. You can join adjacent draft shots, split at the playhead, and write a separate description for each segment. Only video analysis creates the measured record. Detected ranges and representative frames stay available for comparison. The canvas and Agent edit the saved breakdown using the same version-checked command.

An optional image-input model can describe the subject, scene, and framing visible in a representative frame. Fill missing suggestions works on up to 12 missing shots per request batch and saves each result as it arrives. After a rate limit or another provider error, the editor shows the reason and keeps the data already saved. After a session expires, reopen the project and continue from the missing suggestions. Starting analysis from an Agent prompt and describing motion across frames are follow-up work tracked by #171.

Labels

Suggested labels are type:feat, area:canvas, area:agent, and modality:video.

Test plan

  • Local candidate b5d7f058d3870380246e7d4855fc85930d982091 against main at 322f98c317322c1ac12541093719c890507b51b0. The Draft is synchronized with the merged [test] canvas: clear the tool rail when seeding the toolbar drag #686 toolbar fixture fix and the current Release workflow. The PR-diff pre-commit hooks, generated contracts, bilingual copy, browser manifest, and production build passed. The default Python core shard includes the shot detection, description, and creation-shot tests.
  • 456 related Python tests passed across shot detection, draft commands, project storage, and CI coverage. All 1,122 frontend tests passed.
  • Chromium verified link import, three detected shots, a simulated HTTP 429, a manual cut at 2.333 s, saving and reopening, and recovery to all three suggestions with both draft notes intact. A separate run confirmed the Chinese preview tooltip. The toolbar test passed all four language and zoom combinations with CI's Chromium version. The system clipboard test hit the same local assertion on the candidate and unchanged main. Both toolbar and clipboard tests passed in main's hosted browser lane.
  • On this head, Release checks, CodeQL, and DSH plugin checks passed. The isolated browser lane passed 37/37, including the toolbar and system clipboard. The three Python shards passed 3,780 tests with 123 skips, and the final shard inventory check passed. The native lane passed the OpenCode gateway regression.
  • Independent pre-review: 92/100 on base 322f98c317322c1ac12541093719c890507b51b0 and head b5d7f058d3870380246e7d4855fc85930d982091. Live-provider description quality and full-corpus cut accuracy remain open validation items.

Evidence

Browser walkthrough on b5d7f058 · Run receipt

Previously, a partial result did not identify a rate limit, and save confirmation was easy to miss when the draft was scrolled. In the walkthrough, choose the fixture model and click Analyze shots. The second model request returns HTTP 429 and the editor names the reason. Add a cut and notes, then click Save breakdown. The confirmation stays next to the button. Refresh, reopen, and use Fill missing suggestions.

Screenshot of the 429 explanation · Screenshot of the saved draft · Screenshot of the Chinese preview tooltip

The preview tooltip directs a read-only browser window to the action that enables editing. Its previous text said to unlock the node even while the window was in preview mode. Reproduce it by opening the same project in a second browser window and hovering over the Shot Breakdown button.

The clip is five seconds from the Sintel trailer. Sintel is by the Blender Foundation, licensed CC BY 3.0.

Provider verification

The walkthrough uses actual Chromium, video decoding, and project storage. A download fixture supplies the same Sintel clip, and a local model fixture supplies responses and the simulated rate limit. Live-provider description quality and full-corpus cut accuracy remain open validation items.

Bilingual UI

The controls, progress messages, and guide ship in English and Simplified Chinese.

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WITHHOLD 7ad0b12 Refs #171

我下载看了 48 秒的 Sintel 录像:从画布打开分镜、检测切点、修改第 5 镜、刷新后仍能看到编辑值。检测结果和用户编辑分开保存,这个方向合理。现在建议先确认模型描述是否要支持补跑:如果先只检测,或者模型中途 429,现有入口会直接返回已保存文档,不能补齐缺失建议。具体位置见行内。

草稿暂定 73/100(非批准分):范围 2/3、正确性 2/3、验证 3/3、主张证据 2/3、简洁性 2/3。当前 Release checks、CodeQL 和 DSH 已绿;我未独立运行应用。录像验证的是本地切镜和保存,模型描述只有替身测试,不代表真实模型或人工标注集的效果。如果描述补跑留后续,建议在 UI 和 #171 都写清楚本版边界。

English: Verified the recorded detect/edit/reopen path and green CI. Clarify recovery for partial or detection-only results before marking ready.

Dot,代表 @david6666666。

raise ProjectError('正在分析另一段参考视频,请稍后重试。', 409, code='shot_analysis_busy')
async with self.analysis_slot:
saved = await asyncio.to_thread(self.get, project_id, asset_id)
if saved is not None:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这会让同一素材的后续分析直接拿到旧文档。先选「仅检测」,或描述跑到一半遇到 429,用户就没法再给未描述的镜头补建议。能否用一个独立的补跑入口,只填缺失建议,保留检测结果和手工编辑?如果有意留给后续,也建议在界面明确告诉用户这次结果不会自动补齐。

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WITHHOLD 1b1c991 Refs #171

上轮模型描述无法补跑的问题已修。新入口只读取已保存的代表帧、补缺失建议,每条成功就保存。我下载核对了 58 秒的录像:第一次只存了 1/3;第 2 镜手工改过、保存并重新打开后,点击补齐,最后是 3/3,手工改动仍在。测试也覆盖了限流、重复补齐和生成期间的并发编辑。原行内意见不重复贴。

本次草稿 92/100(非批准分):范围 2/3(仅覆盖 #171 的分镜及补齐切片)、正确性 3/3、验证 3/3、主张证据 3/3、简洁性 2/3。Ran: 同一提交 Release checks、CodeQL 和 DSH 都绿。Not run: 我没有独立运行应用或真实视觉模型;录像的 429 和模型建议来自本地替身,不是描述质量或切点精度的评测。

目前还是 Draft,先等维护者确认这版交付边界并转 Ready,再评是否满足正式批准条件。

English: The new recording verifies partial recovery and preservation of manual edits. Exact-head CI is green; no live-model quality claim. Still a draft.

Dot,代表 @david6666666。

@princepride

Copy link
Copy Markdown
Collaborator

@prettygirlisnotme I had prototyped a reference breakdown on my side before noticing this PR. Since #171 is yours and #606 is further along, I'm leaving the breakdown here and only sent the part that doesn't overlap: #634 imports a video from a web page link (canvas menu, opendirector asset import-url, and the Agent), so a reference can come from a URL before it reaches your editor.

Two things from the prototype that may help once your format settles, and I'm happy to send them as follow-ups on top of #606 rather than here:

  • CLI / Agent entry. The real Agent (Default runtime, Qwen3.8-27B) never discovered a breakdown command on its own: asked to "break down the reference video on the canvas", it ran ffmpeg select='gt(scene,…)' directly on files in the project's assets/ directory. With a short bundled skill pointing to the command, it ran it and read the result in four calls. An opendirector command over your save/detect services plus a skill like that would let the Agent use your breakdown.
  • One overview request. Sending a single numbered contact sheet (one keyframe per shot, labelled #N in–out) to an image-input chat model and asking for JSON per shot gave usable shot size / camera / content for a 14-shot trailer in one request (~25 s on Qwen3.8-27B). It might be an option for the "fill missing suggestions" batch if per-shot requests get slow.

No action needed on this PR from my side; just flagging so we don't duplicate work.

Copy link
Copy Markdown
Contributor Author

Thanks, @princepride! The Agent example was really helpful, and #634 fits nicely with the breakdown workflow. I’ve synced my local branch with main and tested the import-to-breakdown flow. I’d be happy to take you up on the CLI/Agent follow-up once the breakdown format settles. The contact sheet sounds worth benchmarking too.

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WITHHOLD a9e762f Refs #171

我下载看了 72 秒的录屏:模拟 429 后先保留 1/3 条建议;在 2.333 秒加切点、保存并重开后,补齐了余下两条,手工备注还在。录屏绑定 6aa64357,到当前提交只有中文 README 的空白修正。代码和测试也区分了检测产生的原始记录与通用编辑;前一轮的补齐意见不用再改。

Ran: 核对录屏、截图、回执、提交差异和 同一提交的 Release checks。浏览器、CodeQL、DSH 通过;Release Python 在 OpenCode image-model 集成路径超时。Not run: 未独立启动应用或真实视觉模型;录像是本地模型替身,不能证明真实描述质量或标注集检测精度。

本次草稿 85/100(非批准分):范围 2/3(Agent 发起分析留在 #171),正确性 3/3,验证 2/3,主张证据 3/3,简洁性 2/3。等 Release 绿灯和转出草稿再评正式批准,无需为此 rebase。

Dot,代表 @david6666666

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WITHHOLD 12edf20 Refs #171

这次合并上游后,共用的 editor contract 同时保留了 Motion Studio 和 Shot Breakdown。我下载、完整解码并抽看了 73 秒录屏,回执也固定到这个 head:3 个检测镜头编辑后变 4 个,模拟 429 后补齐,保留两条手工备注。录像使用本地模型替身,不证明真实 provider 的描述质量。

当前 Release CI 的 Python 已过;isolated lane 红在与 main 相同的 0.5× toolbar 用例(#686 正在修),不是分镜用例。先等这个共享门槛解除并转出 Draft,再看同版结果;不要求仅因为 main 前进而 rebase。

Ran: 增量 diff、附件、回执和 CI 日志。Not run: 未自行启动应用或真实 provider。当前 85/100(非批准):范围 2、正确性 3、验证 2、主张证据 3、简洁性 2。

English: The exact-head browser fixture preserves manual notes through partial results and retry. Release still fails on the known toolbar case.

Dot,代表 @david6666666。

@prettygirlisnotme
prettygirlisnotme marked this pull request as ready for review December 5, 2026 11:11

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WITHHOLD b5d7f05 Refs #171

当前证据暂定 85/100,非批准分(范围 2、正确性 3、验证 2、主张证据 3、简洁度 2)。已下载、解码并抽看当前 SHA 的 73 秒完整录屏,和另外四份图/回执的 Git blob 一致。回执和画面显示 3 个检测镜头编辑后变为 4 个、模拟 429 后继续补齐,保留两条手工备注。不是实机 provider 或分镜模型精度验证,Agent 发起分析也仍在 #171 后续范围。

本 SHA 的 Release、CodeQL、DSH 已绿。挡住的是 #661 刚合入后出现的真实冲突:GitHub 报 dirty,我用当前 main、共同 base 和 PR head 对三个文件做了只读三方核对,发现源 IssueCode 列表和两份生成契约冲突。请保留两边的错误码,先解源契约再生成 JSON/TS;不用仅因为分支落后而追 main。

Dot,代表 @david6666666。

'voice_consent_required', 'voice_name_invalid', 'voice_audio_invalid', 'voice_format',
'voice_size', 'voice_duration', 'voice_provider_protocol', 'voice_provider_error', 'voice_provider_timeout', 'voice_model_unsupported',
'voice_name_taken', 'voice_provider_quota']
'voice_name_taken', 'voice_provider_quota', 'shot_evidence_immutable']

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#661 刚在同一段加了音频错误码,GitHub 现在显示实际冲突,本地对原始文本做三方合并也相同。请保留这里的 shot_evidence_immutable 和 main 的音频码,再从 Python 契约统一生成 JSON/TS,别手工只选一侧。

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants